﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AlbumListing.ascx.cs" Inherits="AlbumListing" %>
<%@ Import Namespace="DTO" %>
<%@ Register src="AllowPagingDataList.ascx" tagname="AllowPagingDataList" tagprefix="uc1" %>
<style type="text/css">
    img.border{padding:5px;border:1px solid #eee;background-color:#efefef;}
    .showimage{}
</style>
 <asp:DataList ID="dtlProducts" EnableTheming="False" runat="server"  
       DataKeyField="ID" GridLines="None" Width="100%" RepeatColumns="2" 
        ForeColor="Black">
        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
       <ItemTemplate>
       <table>
       <tr>
       <td align="center">
            <div class="imagecontent">                                  
                        <a href='<%#Globals.ApplicationPath%>album/<%#Eval("ID")%>/<%#Utils.ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Title").ToString())%>.aspx'/>
                            <asp:Image runat="server" ID="ImageUrl" ImageUrl='<%# Eval("ImageUrl")%>' />
                        </a> 
                        <br /> 
                        <asp:Label runat="server" ID="Label1" Text='<%# Eval("Title")%>' />                          
            </div>       
       </td>
       </tr>
       </table>
       <div style="height:30px;" />
       </ItemTemplate>
    </asp:DataList>
<uc1:AllowPagingDataList ID="AllowPagingDataList1" runat="server" />    
<asp:ObjectDataSource ID="objArticles" runat="server" DeleteMethod="DeleteArticle"
   SelectMethod="ListArticles" SelectCountMethod="Articles_GetArticleCount" 
   TypeName="BLL.Article.Article">
   <DeleteParameters>
      <asp:Parameter Name="id" Type="Int32" />
   </DeleteParameters>
   <SelectParameters>
      <asp:Parameter DefaultValue="true" Name="publishedOnly" Type="Boolean" />
       <asp:QueryStringParameter Name="categoryID" QueryStringField="DeptID" 
           Type="Int32" />
   </SelectParameters>
</asp:ObjectDataSource>
